![]() |
PATH![]() |
![]() ![]() |
The following Menu Manager functions for initializing the Menu Manager are new, changed, or not recommended with Appearance Manager 1.0:
Adds a program to the system registry of contextual menu clients.
pascal OSStatus InitContextualMenus (void);
Your program should call the InitContextualMenus function early in your startup code to register your application as a contextual menu client. If you do not register your program, some system-level functions may respond as though your program does not use contextual menus. Not registering your program may also cause ProcessIsContextualMenuClient to return an incorrect value.
If you have a 68K program, you must pass the selector gestaltContextualMenuAttr to the Gestalt function before calling the InitContextualMenus function. If the Gestalt function returns a bit field with the gestaltContextualTrapAvailable bit set, InitContextualMenus can be called; see Contextual Menu Gestalt Selector Constants .
Available with Appearance Manager 1.0 and later.
Determines whether a given program is a contextual menu client.
pascal Boolean ProcessIsContextualMenuClient(ProcessSerialNumber* inPSN);
The ProcessIsContextualMenuClient function checks the system registry of contextual menu clients and returns true if the program in the given process supports contextual menus. However, the program must have been registered as a client using InitContextualMenus .
Contextual Menu Gestalt Selector Constants .
Sets the mbResID field of the current menu list to the resource ID of a custom 'MBDF' resource.
pascal void InitProcMenu (short resID);
If your application provides its own menu bar definition function, use the InitProcMenu function to associate your custom 'MBDF' resource with the current menu list. In general, you should not use a custom menu bar definition unless absolutely necessary. InitProcMenu creates the current menu list if it hasn't already been created by a previous call to InitMenus .
You can also call InitProcMenu to bypass mapping of the pre-Appearance menu resource ID constant textMenuProc to its corresponding Appearance-compliant menu resource ID constant kMenuStdMenuProc when mapping is enabled.
The resource ID of your application's menu bar definition function is maintained in the current menu list until your application next calls InitMenus ; InitMenus initializes the mbResID field with the resource ID of the standard menu bar definition function. This can affect applications such as development environments that control other applications which may call InitMenus .
Previous | Back Up One Level | Next |